package com.chukun.netty.codec.customize;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * 自定义编解码器
 */
public class NettyServerHandler extends SimpleChannelInboundHandler<Long> {
    
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, Long msg) throws Exception {
        System.out.println("received from client : "+msg);
        ctx.writeAndFlush(9999L);
    }
}
